<template>
  <div class="order-item">
    <div class="room-item">
      <div class="img">
        <image
          src="https://img.js.design/assets/img/662670b07ce858ff66831829.jpg"
          mode="aspectFill"
        />
      </div>
      <div class="room-info">
        <div class="name">山景十二室一厅套房</div>
        <div class="spec">
          民宿名称：
          <span>某某民宿</span>
        </div>
        <div><div class="button">已付款</div></div>
      </div>
    </div>

    <div class="content">
      <div class="item">
        <div class="text">付款金额(元)</div>
        <div class="price">￥255</div>
      </div>
      <div class="item">
        <div class="text">付款预估收入(元)</div>
        <div class="price">￥58</div>
      </div>
    </div>
    <div class="content">
      <div class="item">
        <div class="text">总提成率</div>
        <div class="price">20%</div>
      </div>
      <div class="item">
        <div class="text">平台技术服务费(元)</div>
        <div class="price">￥0.2</div>
      </div>
    </div>
    <div class="tips">2024-06-03 15:06:45 付款</div>
  </div>
</template>
<script setup lang="ts">
import { to } from '@/utils/page'
defineOptions({ name: 'OrderItem' })
const props = defineProps(['order'])
</script>
<style lang="scss" scoped>
.order-item {
  padding: 26rpx;
  margin-bottom: 26rpx;
  background-color: #fff;
  border-radius: 30rpx;
  .room-item {
    display: flex;
    .img {
      width: 157rpx;
      height: 157rpx;
      overflow: hidden;
      border-radius: 23rpx;
      image {
        width: 100%;
        height: 100%;
        border-radius: 23rpx;
      }
    }
    .room-info {
      display: flex;
      flex: 1;
      flex-direction: column;
      justify-content: space-between;
      width: 0;
      margin-left: 16rpx;
      .name {
        font-size: 27rpx;
        font-weight: 600;
        line-height: 31rpx;
        color: var(--color1);
        @include text-clamp(1);
      }
      .spec {
        font-size: 25rpx;
        line-height: 38rpx;
        color: var(--color4);
        @include text-clamp(2);
        span {
          color: var(--color3);
        }
      }
      .button {
        display: inline-block;
        height: 46rpx;
        padding: 0 20rpx;
        font-size: 20rpx;
        line-height: 46rpx;
        color: #fff;
        background-color: var(--color1);
        border-radius: 12rpx;
      }
    }
  }
  .content {
    display: flex;
    margin-top: 34rpx;
    .item {
      flex: 1;
      width: 0;
      .text {
        font-size: 23rpx;
        color: var(--color4);
      }
      .price {
        margin-top: 12rpx;
        font-size: 30rpx;
        font-weight: 600;
        line-height: 36rpx;
        color: var(--color1);
      }
    }
  }
  .tips {
    margin-top: 30rpx;
    font-size: 23rpx;
    line-height: 1;
    color: var(--color4);
  }
}
</style>
